<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['package.mgmt.label']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
		<h:panelGroup>
		    <h:outputText value="#{messages['package.product.add.label']}" styleClass="sub_header" />
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="packageProduct" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="packageProduct" value="#{messages['package.product.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="packageProduct" styleClass="standardText" value="#{adminPackageBean.partnerProduct.partnerProductId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminPackageBean.selectProductList}"/>
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="qty" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="qty" value="#{messages['package.product.qty.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="qty" required="true" size="5" maxlength="5" styleClass="standardText" value="#{adminPackageBean.packageProducts.qty}"></t:inputText>
		
		 
		<h:outputText></h:outputText>
		<t:message for="noOfDays" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noOfDays" value="#{messages['package.product.no.of.days.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="noOfDays" required="true" size="3" maxlength="3" styleClass="standardText" value="#{adminPackageBean.packageProducts.noOfDays}"></t:inputText>
		
		
		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['create']}" styleClass="button" action="#{adminPackageBean.addPackageProductAction}" actionListener="#{adminPackageBean.addPackageProductActionEvent}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminPackageBean.navUpdatePackageAction}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	